package com.accenture.job.executor.service.jobhandler.ai;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.accenture.job.executor.mapper.AIMapper;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;

/**
 * 新增AIShardDB数据
 *
 * @author binbin.a.zhang 2018-05-08
 */
@JobHandler(value = "InrestAIJobHandler")
@Component
@Transactional
public class InrestAIJobHandler extends IJobHandler {
	@Autowired
	AIMapper aIMapper;

	@Override
	public ReturnT<String> execute(String param) throws Exception {
		XxlJobLogger.log("Accenture-JOB, Inrest AI Handler.");
		int inrestAiAttendanceExpenseRowCount = aIMapper.aiAttendanceExpense();
		XxlJobLogger.log("Accenture-JOB, Inrest AI Handler AiAttendanceExpense InrestRowCount:"+ inrestAiAttendanceExpenseRowCount);
		int inrestAiSellerNameExpenseRowCount = aIMapper.aiSellerNameExpense();
		XxlJobLogger.log("Accenture-JOB, Inrest AI Handler AiSellerNameExpense InrestRowCount:"+ inrestAiSellerNameExpenseRowCount);
		return SUCCESS;
	}
}
